<%@ page contentType="text/html" pageEncoding="UTF-8" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<nav>
	<ul>
		<c:url value="/continents" var="continentsURL" />
		<li><a href="${continentsURL}">Destinations by continent</a></li>
		<c:url value="/destinations" var="destinationsURL" />
		<li><a href="${destinationsURL}">Destinations by name</a></li>
		<security:authorize url="/trips/export">
			<li><a href="<c:url value='/trips/export'/>">Export trips</a></li>
		</security:authorize>
		<security:authorize url="/trips/import">
			<li><a href="<c:url value='/trips/import'/>">Import trips</a></li>
		</security:authorize>
		<security:authorize access="isAnonymous()">
			<li><a href="<c:url value='/login'/>"><fmt:message
						key="login" /></a></li>
		</security:authorize>
		<security:authorize access="isAuthenticated()">
			<security:authentication property="name" var="userName" />
			<li><a href="<c:url value='/j_spring_security_logout'/>"> <fmt:message
						key="logout">
						<fmt:param value="${userName}" />
					</fmt:message></a></li>
		</security:authorize>

	</ul>
</nav>

